#ifndef _PASSWORD_BOX_H_
#define _PASSWORD_BOX_H_
#include "cocos2d.h"
#include "cocos/ui/CocosGUI.h"


class PasswordBox : public cocos2d::Layer
{
private:
	std::int16_t							m_BoxType;
	cocos2d::ui::Button*					m_btnCancel;
	cocos2d::ui::Button*					m_btnOK;
	cocos2d::ui::Text*						m_title;
	cocos2d::ui::TextField*					m_txtCin;
	const char*								m_strCinText;
public:
	PasswordBox(void);
	~PasswordBox(void);
	virtual bool init(std::int16_t boxType);
	static PasswordBox *create(std::int16_t boxType);
	void SetTitle(char* szTitle);
	const char* GetPassWord(){ return m_strCinText;}
	void SetBenCallBack(cocos2d::Ref* target,cocos2d::ui::SEL_TouchEvent selector);
private:
	void textFieldCallBack(cocos2d::Ref* sender, cocos2d::ui::TextFiledEventType type);
};

#endif // !_PASSWORD_BOX_H_
